package com.tedu.day06mybatis.mapper;


import com.tedu.day06mybatis.pojo.Weibo;
import com.tedu.day06mybatis.pojo.WeiboVO2;
import com.tedu.day06mybatis.pojo.WeiboVO3;
import com.tedu.day06mybatis.pojo.WeiboVo1;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface WeiboMapper {
    //@Insert("")
    int insertWeibo(Weibo weibo);

    int deleteById(Integer id);

    int updateWeiboById(Weibo weibo);

    Weibo selectWeiboById(Integer id);

    List<Weibo> findAll();

    //@Select("")
    //Weibo selectWeiboContentByid(int id);
    WeiboVo1 selectWeiboContentByid(int id);

    int dynamicUpdate(Weibo weibo);

    int deleteByIds(int[] id);

    int deleteByIds2(List<Integer> id);

    int selectCount();

    /*
    查看微博的id，内容，用户id
    select id,content,user_id userId from weibo
     */
    WeiboVO2 selectResultMap(int id);

    WeiboVO3 selectWeiboAndCommentById(int id);

}
